package cn.jyc.ssm03.dao;

import cn.jyc.ssm03.pojo.MenuList;
import cn.jyc.ssm03.pojo.Role;
import cn.jyc.ssm03.pojo.RoleMenu;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoleMapper {
    @Select("select * from sys_roles")
    public List<Role> qryRole();
    @Select("select mid from sys_role_menu where rid = #{id}")
    public List<Integer> getRoleMenu(Integer id);
    @Insert("insert into sys_role_menu value (#{rid},#{mid})")
    public void addRoleMenu(RoleMenu rm);
    @Delete("delete from sys_role_menu where rid = #{id}")
    public void delRoleMenu(Integer id);
}
